﻿<UserControl x:Class="Simp.Interpreter.ContentItemUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Simp.Interpreter">
	<StackPanel>
		<!--	Original content	-->
		<StackPanel Orientation="Horizontal">
			<TextBlock FontWeight="bold">&gt;&gt;</TextBlock>
			<TextBlock
				FontStyle="Italic" TextWrapping="WrapWithOverflow"
				Text="{Binding ContentItem.OriginalContent, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" />
		</StackPanel>
		<!--	Parsed functions	-->
		<ItemsControl
			ItemsSource="{Binding ContentItem.ParsedFunctionList, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}">
			<ItemsControl.ItemTemplate>
				<DataTemplate>
					<TextBox
						Background="Transparent" IsReadOnly="True" FontStyle="Italic" TextWrapping="WrapWithOverflow"
						BorderThickness="0"
						Text="{Binding Mode=OneWay}" />
				</DataTemplate>
			</ItemsControl.ItemTemplate>
		</ItemsControl>
	</StackPanel>
</UserControl>
